<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'unit-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'id_beneficiary'); ?>
		<?php echo $form->textField($model,'id_beneficiary'); ?>
		<?php echo $form->error($model,'id_beneficiary'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'delivered_date'); ?>
		<?php //echo $form->textField($model,'delivered_date'); ?>
		<?php 
			$this->widget('zii.widgets.jui.CJuiDatePicker', array(
				'attribute'=>'delivered_date',
				'model'=>$model,
				// additional javascript options for the date picker plugin
				'options'=>array('showAnim'=>'fold','dateFormat'=>'yy-mm-dd'),
				'htmlOptions'=>array('style'=>'height:20px;'),
			));
		?>
		<?php echo $form->error($model,'delivered_date'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'notes'); ?>
		<?php echo $form->textArea($model,'notes',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'notes'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->